package cnpm.service.impl;

import java.util.List;

import cnpm.dao.InsuranceDAO;
import cnpm.dao.impl.InsuranceDAOImpl;
import cnpm.entity.Employee;
import cnpm.entity.Insurance;
import cnpm.service.InsuranceService;

public class InsuranceServiceImpl implements InsuranceService {

	private InsuranceDAO iDAO;
	
	public InsuranceServiceImpl() {
		iDAO = new InsuranceDAOImpl();
	}
	
	@Override
	public boolean saveOrUpdateInsurance(Insurance insu) {
		return iDAO.saveOrUpdateInsurance(insu);
	}

	@Override
	public boolean deleteInsurance(Insurance insu) {
		return iDAO.deleteInsurance(insu);
	}

	@Override
	public List<Insurance> getAllInsurance(Employee e) {
		return iDAO.getAllInsurance(e);
	}

	@Override
	public Insurance getInsuranceByID(String insuranceID) {
		return iDAO.getInsuranceByID(insuranceID);
	}

}
